﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Net;
using System.IO;
using System.Xml;

namespace WebViecLam
{
    public partial class NopDonTrucTuyen : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string userID = Request.QueryString["userID"];
            string enrollID = Request.QueryString["enrollID"];

            string strRequest = "http://localhost:8080/ViecLamService/GetItemEnrollInformation/" + enrollID;
            HttpWebRequest request = (HttpWebRequest)(WebRequest.Create(strRequest));
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            StreamReader streamReader = new StreamReader(response.GetResponseStream());

            // string xml
            string xmlListOfStudents = streamReader.ReadToEnd();

            if (xmlListOfStudents != "")
            {
                XmlDocument xmlDocument = new XmlDocument();
                xmlDocument.LoadXml(xmlListOfStudents);

                XmlNode nodeDS = xmlDocument.DocumentElement;
                /*
                enrollInforID = nodeDS.ChildNodes[0].InnerText;
                lbEnrName.Text = nodeDS.ChildNodes[1].InnerText;
                lbEnrDescription.Text = nodeDS.ChildNodes[2].InnerText;
                lbEnrRequire.Text = nodeDS.ChildNodes[3].InnerText;
                userID = nodeDS.ChildNodes[4].InnerText;
                lbCompanyName.Text = nodeDS.ChildNodes[5].InnerText;
                lbCompanyDescription.Text = nodeDS.ChildNodes[6].InnerText;
                lbCompanyLink.Text = nodeDS.ChildNodes[7].InnerText;
                lbLevel.Text = nodeDS.ChildNodes[8].InnerText;
                lbEnrAge.Text = nodeDS.ChildNodes[9].InnerText;
                lbSex.Text = nodeDS.ChildNodes[10].InnerText;
                lbDiploma.Text = nodeDS.ChildNodes[11].InnerText;
                lbEnglishLevel.Text = nodeDS.ChildNodes[12].InnerText;
                lbExperienceNumber.Text = nodeDS.ChildNodes[13].InnerText;
                lbQuantity.Text = nodeDS.ChildNodes[14].InnerText;
                lbSalary.Text = nodeDS.ChildNodes[15].InnerText;
                lbMajor.Text = nodeDS.ChildNodes[16].InnerText;
                string isShow = nodeDS.ChildNodes[17].InnerText;
                lbCreatedDate.Text = nodeDS.ChildNodes[18].InnerText;
                lbEndDate.Text = nodeDS.ChildNodes[19].InnerText;
                lbArea.Text = nodeDS.ChildNodes[20].InnerText;
                _lat = nodeDS.ChildNodes[21].InnerText;
                _lng = nodeDS.ChildNodes[22].InnerText;
                lbLeaderName.Text = nodeDS.ChildNodes[23].InnerText;
                lbLeaderPhone.Text = nodeDS.ChildNodes[24].InnerText;
                lbLeaderEmail.Text = nodeDS.ChildNodes[25].InnerText;*/
            }
        }
    }
}
